package util

// GetNewBeeMallOrderStatusEnumByStatus 订单状态筛选器
func GetNewBeeMallOrderStatusEnumByStatus(orderStatus int) string {
	switch orderStatus {
	case -9:
		return "Error"
	case 0:
		return "待支付"
	case 1:
		return "已支付"
	case 2:
		return "配货完成"
	case 3:
		return "出库成功"
	case 4:
		return "交易成功"
	case -1:
		return "手动关闭"
	case -2:
		return "超时关闭"
	case -3:
		return "商家关闭"
	}
	return ""
}

// GetPayTypeEnumByType 支付方式条件筛选
func GetPayTypeEnumByType(payType int) string {
	switch payType {
	default:
		return "Error"
	case 0:
		return "无"
	case 1:
		return "支付宝"
	case 2:
		return "微信支付"
	}
}

// GetIndexType 首页配置项选择
//首页配置项 1-搜索框热搜 2-搜索下拉框热搜 3-(首页)热销商品 4-(首页)新品上线 5-(首页)为你推荐
func GetIndexType(indexType int) (int, string) {
	switch indexType {
	default:
		return 0, "DEFAULT"
	case 1:
		return 1, "INDEX_SEARCH_HOTS"
	case 2:
		return 2, "INDEX_SEARCH_DOWN_HOTS"
	case 3:
		return 3, "INDEX_GOODS_HOTS"
	case 4:
		return 4, "INDEX_GOODS_NEW"
	case 5:
		return 5, "INDEX_GOODS_RECOMMOND"
	}
}
